package com.mrtan.controller;

import cn.dev33.satoken.util.SaResult;
import com.mrtan.dto.HomeDto;
import com.mrtan.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 首页
 * @author 李聪
 * @version 2023/12/17
 */
@RestController
@RequestMapping("/home")
public class HomeController {
    @Resource
    private OrderService orderService;

    @GetMapping("show")
    public SaResult showInfo(){
        HomeDto showhome = orderService.showhome();
        return SaResult.ok().setData(showhome);
    }

}
